package com.ytjj.qmyx.supplychain.service;

import com.ytjj.qmyx.supplychain.mapper.SpecialMapper;
import com.ytjj.qmyx.supplychain.mapper.entity.YxSpecial;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class SpecialService {
    @Resource
    private SpecialMapper specialMapper;

    public List<YxSpecial> getSpecialList() {
        Example example = new Example(YxSpecial.class);
        example.createCriteria().andEqualTo("type", "mall");
        example.orderBy("sort").asc();
        return specialMapper.selectByExample(example);
    }
}
